<?php

namespace app\api\model;

use think\Model;

class AutoService extends Model
{
    protected $table = 'auto_services';


    public static function getServicePrice($serviceId)
    {
        return self::whereIn('id', $serviceId)->sum('service_price');
    }

    public function service()
    {
        return $this->hasOne(ModelingServices::class, 'id', 'service_id');
    }

    public static function getServiceId($id)
    {
        return self::whereIn('id', $id)->column('service_id');
    }
}
